<%--
  Created by IntelliJ IDEA.
  User: HJW
  Date: 2021/7/12
  Time: 下午 08:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>My Ajax</title>
    <%-- Jsp 页面需要加前缀 --%>
    <script src="${pageContext.request.contextPath}/static/js/jquery-3.6.0.min.js" />
    <script type="text/javascript">
        function onb(){
            /* ajax 默认是 get 请求*/
            $.ajax({
               url: "${pageContext.request.contextPath}/flag/wy/text",
                data: {"name": $("texN").val()},
               success: function (data,status){
                   console.log(data);
                   console.log(status)
               }
            });
        }
    </script>
</head>
<body>
    神马乐团：
    <input src="text" id="texN" value="" onblur="onb()" />
</body>
</html>
